﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Amazon.DynamoDBv2.DocumentModel;
using Amazon.DynamoDBv2.Model;

namespace AmazonDynamoDBStub.Extensions.Internal
{
    static class DynamoDBEntryExtensions
    {
        public static AttributeValue ConvertToAttributeValue(this DynamoDBEntry entry)
        {
            return typeof(Primitive).InvokeMember("ConvertToAttributeValue", 
                BindingFlags.Instance | BindingFlags.NonPublic, null, entry, new object[] { }) as AttributeValue;
        }
    }
}
